const dev = {
    /** port 端口 */
    serverPort: 89,
    dbConfig: {
        host: '39.104.61.253',
        user: 'root',
        port: '3306',
        password: 'ankuai',
        database: 'transport',
        waitForConnections: true,
        connectionLimit: 10,
        queueLimit: 0,
    },
    redisConfig: 'redis://:ankuai@118.31.14.83:6379',
    whiteList: ['/oper/login', '/images','/enableVehicle/query','/transport/report'],

};

const pro = {
    /** port 端口 */
    serverPort: 9961,
    dbConfig: {
        host: '47.98.99.253',
        user: 'root',
        password: 'ankuai',
        database: 'bcck',
        waitForConnections: true,
        connectionLimit: 50,
        queueLimit: 0,
    },
    redisConfig: 'redis://:ankuai@118.31.14.83:6379',
    createNotifyCallBack: 'http://dev.ktpark.net:9961/api/lsy/merchant_status_change/notice',
};

const local = {
    whiteList: ['/oper/login'],
};

let config = {
    /** port 端口 */
    serverPort: 9961,
    dbConfig: {
        host: 'dev.ktpark.net',
        user: 'root',
        port: '3306',
        password: 'ankuai',
        database: 'bcck',
        waitForConnections: true,
        connectionLimit: 10,
        queueLimit: 0,
    },
    redisConfig: 'redis://:ankuai@118.31.14.83:6379',
    payNoticeUrl: {
        LSY: `http://dev.ktpark.net:9961/api/pay_notify/LSY`,
    },
    whiteList: ['/oper/login', '/images', '/api/pay_notify', '/api/pay/appletPay', '/applet/queryPrice', '/api/applet/noPlateIn', '/api/lsy/merchant_status_change/notice', '/api/applet/isChannelPay'],
    //小程序参数
    applet_param: {
        //百城
        // APPID: 'wx1c49ff89114d333e',
        // APPSECRET: '732529a344d537c71188cea0b51a437a',
        //物业
        APPID: 'wxb7779b60d1485fb2',
        APPSECRET: '10e3d0472210a6864356664f9d947541',
        env_version: 'develop',
    },
};

(() => {
    config = {
        // ...config,
        ...{ dev, pro, local }[process.env.NODE_ENV || 'dev'],
    };
    console.log('config', config);
})();

export default config;
